package echo.nio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author： zhangnan
 * @date： 2025/4/23 16:28
 * @description： nio客户端
 * @modifiedBy：
 * @version: 1.0
 */
public class TestClient {

    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress(8080));
        sc.write(Charset.defaultCharset().encode("1234567890abcdef"));
        System.in.read();

    }



}